package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.SysProjectProductRel;
import com.ruoyi.system.mapper.SysProjectProductRelMapper;
import com.ruoyi.system.service.ISysProjectProductRelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 项目产品关系Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-12-28
 */
@Service
public class SysProjectProductRelServiceImpl implements ISysProjectProductRelService
{
    @Autowired
    private SysProjectProductRelMapper sysProjectProductRelMapper;

    /**
     * 查询项目产品关系
     * 
     * @param relId 项目产品关系ID
     * @return 项目产品关系
     */
    @Override
    public SysProjectProductRel selectSysProjectProductRelById(Long relId)
    {
        return sysProjectProductRelMapper.selectSysProjectProductRelById(relId);
    }

    /**
     * 查询项目产品关系列表
     * 
     * @param sysProjectProductRel 项目产品关系
     * @return 项目产品关系
     */
    @Override
    public List<SysProjectProductRel> selectSysProjectProductRelList(SysProjectProductRel sysProjectProductRel)
    {
        return sysProjectProductRelMapper.selectSysProjectProductRelList(sysProjectProductRel);
    }

    /**
     * 新增项目产品关系
     * 
     * @param sysProjectProductRel 项目产品关系
     * @return 结果
     */
    @Override
    public int insertSysProjectProductRel(SysProjectProductRel sysProjectProductRel)
    {
        return sysProjectProductRelMapper.insertSysProjectProductRel(sysProjectProductRel);
    }

    /**
     * 修改项目产品关系
     * 
     * @param sysProjectProductRel 项目产品关系
     * @return 结果
     */
    @Override
    public int updateSysProjectProductRel(SysProjectProductRel sysProjectProductRel)
    {
        return sysProjectProductRelMapper.updateSysProjectProductRel(sysProjectProductRel);
    }

    /**
     * 删除项目产品关系对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysProjectProductRelByIds(String ids)
    {
        return sysProjectProductRelMapper.deleteSysProjectProductRelByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除项目产品关系信息
     * 
     * @param relId 项目产品关系ID
     * @return 结果
     */
    @Override
    public int deleteSysProjectProductRelById(Long relId)
    {
        return sysProjectProductRelMapper.deleteSysProjectProductRelById(relId);
    }
}
